3.2166 \(\int x (3-4 x+x^2)^2 \, dx\)

Optimal. Leaf size=34 \[ \frac {x^6}{6}-\frac {8 x^5}{5}+\frac {11 x^4}{2}-8 x^3+\frac {9 x^2}{2} \]

[Out]

9/2*x^2-8*x^3+11/2*x^4-8/5*x^5+1/6*x^6

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {631} \[ \frac {x^6}{6}-\frac {8 x^5}{5}+\frac {11 x^4}{2}-8 x^3+\frac {9 x^2}{2} \]

Antiderivative was successfully verified.

[In]

Int[x*(3 - 4*x + x^2)^2,x]

[Out]

(9*x^2)/2 - 8*x^3 + (11*x^4)/2 - (8*x^5)/5 + x^6/6

Rule 631

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)
*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && IntegerQ[p] && (GtQ[p, 0]
|| EqQ[a, 0])

Rubi steps

\begin {align*} \int x \left (3-4 x+x^2\right )^2 \, dx &=\int \left (9 x-24 x^2+22 x^3-8 x^4+x^5\right ) \, dx\\ &=\frac {9 x^2}{2}-8 x^3+\frac {11 x^4}{2}-\frac {8 x^5}{5}+\frac {x^6}{6}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 34, normalized size = 1.00 \[ \frac {x^6}{6}-\frac {8 x^5}{5}+\frac {11 x^4}{2}-8 x^3+\frac {9 x^2}{2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(3 - 4*x + x^2)^2,x]

[Out]

(9*x^2)/2 - 8*x^3 + (11*x^4)/2 - (8*x^5)/5 + x^6/6

________________________________________________________________________________________

fricas [A]  time = 0.78, size = 26, normalized size = 0.76 \[ \frac {1}{6} x^{6} - \frac {8}{5} x^{5} + \frac {11}{2} x^{4} - 8 x^{3} + \frac {9}{2} x^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(x^2-4*x+3)^2,x, algorithm="fricas")

[Out]

1/6*x^6 - 8/5*x^5 + 11/2*x^4 - 8*x^3 + 9/2*x^2

________________________________________________________________________________________

giac [A]  time = 0.15, size = 26, normalized size = 0.76 \[ \frac {1}{6} \, x^{6} - \frac {8}{5} \, x^{5} + \frac {11}{2} \, x^{4} - 8 \, x^{3} + \frac {9}{2} \, x^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(x^2-4*x+3)^2,x, algorithm="giac")

[Out]

1/6*x^6 - 8/5*x^5 + 11/2*x^4 - 8*x^3 + 9/2*x^2

________________________________________________________________________________________

maple [A]  time = 0.05, size = 27, normalized size = 0.79 \[ \frac {1}{6} x^{6}-\frac {8}{5} x^{5}+\frac {11}{2} x^{4}-8 x^{3}+\frac {9}{2} x^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(x^2-4*x+3)^2,x)

[Out]

9/2*x^2-8*x^3+11/2*x^4-8/5*x^5+1/6*x^6

________________________________________________________________________________________

maxima [A]  time = 1.02, size = 26, normalized size = 0.76 \[ \frac {1}{6} \, x^{6} - \frac {8}{5} \, x^{5} + \frac {11}{2} \, x^{4} - 8 \, x^{3} + \frac {9}{2} \, x^{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(x^2-4*x+3)^2,x, algorithm="maxima")

[Out]

1/6*x^6 - 8/5*x^5 + 11/2*x^4 - 8*x^3 + 9/2*x^2

________________________________________________________________________________________

mupad [B]  time = 0.02, size = 26, normalized size = 0.76 \[ \frac {x^6}{6}-\frac {8\,x^5}{5}+\frac {11\,x^4}{2}-8\,x^3+\frac {9\,x^2}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(x^2 - 4*x + 3)^2,x)

[Out]

(9*x^2)/2 - 8*x^3 + (11*x^4)/2 - (8*x^5)/5 + x^6/6

________________________________________________________________________________________

sympy [A]  time = 0.07, size = 29, normalized size = 0.85 \[ \frac {x^{6}}{6} - \frac {8 x^{5}}{5} + \frac {11 x^{4}}{2} - 8 x^{3} + \frac {9 x^{2}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(x**2-4*x+3)**2,x)

[Out]

x**6/6 - 8*x**5/5 + 11*x**4/2 - 8*x**3 + 9*x**2/2

________________________________________________________________________________________